<template>
	<view :class="{bg141414:theme}" style="min-height: 100vh;">
		
	<view class="con">
		<back title="兑换记录"></back>
		<view v-if="isdata" class="flex-ju-c mt8vh">
			<view class="flex-ju-c flex-col">
				<image mode="widthFix" class="width210 ra20" src="/static/nodata.png"></image>
				<view class=" size24">这里什么也没有~</view>
			</view>
		</view>
		<view :class="theme?'bg292929 colorfff':'bgF5F6F7'" class=" size26 ra15">
			<view v-for="(item,index) in integrallog" :key="index" class="pg20-30 ">
				<view class="flex-ju-b " :class="theme?'colorfff':'color333'">
					<view v-if="item.integral>0">获得积分</view>
					<view v-else>消耗积分</view>
					<view v-if="item.integral>0">+{{item.integral}}积分</view>
					<view v-else>{{item.integral}}积分</view>
				</view>
				<view class="color999 mt5 border-bccc pb30">2024-07-30 12:00</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isdata:false,
				page:1,
				integrallog:[],
				theme: uni.getStorageSync('theme'),
			}
		},
		onLoad(){
			this.getlist()
		},
		onReachBottom() {
			this.page++
			this.getlist()
		},
		methods: {
			getlist(){
				this.http('user/Integrallog',{
					page:this.page,
					per_page:50
				}).then(res=>{
					this.integrallog = [...this.integrallog,...res.data]
					if(this.integrallog.length){
						this.isdata = false
					}else{
						this.isdata = true
					}
				})
			}
		}
	}
</script>

<style>

</style>
